<style>
.winner-customer{
	word-break:break-all;word-wrap:break-word;
}
.region-auction-shelf.region{
	padding:12px;
}
</style>
<li class="auction-item auction-item-home" auction-id="<?php echo CHtml::value($data, 'auction_id') ?>"
    attribute-data-last_time=0 attribute-data-end_time=<?php echo CHtml::value($data, 'end_time') ?>>
    <a class="auction-detail-link" attribute="url"  target="_blank"
       href="<?php echo !empty($data->url) ? $data->url : null ?>">
        <div class="auction-image-box">
                <?php
                     $auctionId=CHtml::value($data, 'auction_id');
                     if($auctionId!==null){
                         $dao=new AuctionDao();
                         $dao->find($auctionId);
                         $specialAuctions=array(3,4,5);
                         $specialAuctionsTitle=array("3"=>'BRONZE',"4"=>'SILVER',"5"=>"GOLD");
                         $specialAuctionsColor=array("3"=>'#89621f',"4"=>'#a9a9a9',"5"=>"#d5b32a");
                         $color="#fff";
                         $title="";
                         if (in_array($dao->type, $specialAuctions)){
                             $color=$specialAuctionsColor[$dao->type];
                             $title=$specialAuctionsTitle[$dao->type];
                         }elseif ($dao->rookie){
                             $color="#ef0000";
                             $title="ROOKIE";
                         }
                         if (in_array($dao->type, $specialAuctions) || $dao->rookie){
                         ?>
                        <div style="position:absolute;border:solid 2px  <?php echo $color?>;right:10px;top:10px;padding:3px;color:<?php echo $color?>;font-size:16px;font-weight:bold;">
                            <?php echo $title?>
                        </div>
                        <?php }?>

                         <?php if (in_array($dao->type, $specialAuctions) && $dao->rookie){
                         ?>
                        <div style="position:absolute;border:solid 2px  <?php echo "#ef0000"?>;left:10px;bottom:15px;padding:3px;color:<?php echo "#ef0000"?>;font-size:16px;font-weight:bold;">
                            <?php echo "ROOKIE"?>
                        </div>
                    <?php }}?>

                <span class="auction-increment">
                    <div class="auction-status-show">

                    </div>
                    <img class="auction-increment-ico"
                         src='<?php
                                 /* $auctionId=CHtml::value($data, 'auction_id');
                                 $rookie = 0;
                                 if(null!=$auctionId){
                                     $rookie=AuctionPool::getRookieAuction($auctionId);
                                 }*/
                                 /* if (intval($rookie)>0 && !in_array($dao->type, $specialAuctions)){
                                     echo Yii::app()->resource->path('img').'/increment/rookie.png';
                                 }else { */
                                     echo Yii::app()->resource->path('img').'/increment/increment-cent-1.png';
                                 /* } */
                         ?>'/>
                </span>
            <img class="auction-image" attribute="images"
                 src='<?php echo !empty($data->images) ? $data->images : Yii::app()->resource->path('img') . '/no-image.png' ?>'
                 onerror="this.src='<?php echo Yii::app()->resource->path('img') . '/no-image.png' ?>'"/>
        </div>
    </a>
    <a class="auction-detail-link" attribute="url"
       href="<?php echo !empty($data->url) ? $data->url : null ?>">
        <div class="auction-title" attribute="title">
            <?php echo CHtml::value($data, 'title') ?>
        </div>
    </a>
    <div class="auction-value-price" attribute="value_price">
            Retail Price:<span class="auction-value-price-text">$
            <?php
                if (!empty($data->value_price)){
                    echo $data->value_price;
                }else{
                    echo "0.00";
                }
            ?></span>
    </div>
    <div class="auction-last-time" attribute="last_date">
        -- : -- : --
    </div>
    <div class="auction-winner" attribute="winner_customer">
         <?php
            $winnerName = CHtml::value($data,'winner_name');
            $avatar = CHtml::value($data,'winner_avatar')?:'/no-avatar.png';
        ?>
        <div class="winner-no-customer <?php echo empty($winnerName)?null:'hide'?>">
        	No bidders yet
        </div>
        <div class="winner-customer <?php echo empty($winnerName)?'hide':null?>">
        	<!--<img class="auction-winner-avatar img-circle" attribute="winner_avatar" src='<?php echo $avatar?>' />-->
        	<span class="auction-winner-name" attribute="winner_name" attribute-animation="flash-value" animation-time=3 ><?php echo $winnerName?></span>
        </div>
        <!-- 
        
         -->
    </div>
    <div class="auction-item-footer">
        <div class="auction-winner-price-cell">
            <span class="auction-winner-price" attribute="winner_price" attribute-animation="flash-value"
                      animation-time=3><?php echo CHtml::value($data,'winner_price','$0.00')?></span>
        </div>
        <div class="bid-auction-cell">
        	<?php $this->widget('application.components.widgets.CBidAuctionBtn',array(
        	   'auctionId' => CHtml::value($data, 'auction_id')
        	))?>
        </div>
    </div>
</li>